package cn.sofwin.project.src.entity;

import cn.sofwin.project.src.service.CallService;
import cn.sofwin.project.src.service.NetService;
import cn.sofwin.project.src.service.SendService;

import java.util.Map;

// 使用场景
public class Scene{
    // 类型（通话/短信/上网）
    public static String type;
    // 消耗 语音/短信/数据 数量
    public static double data;
    // 描述
    public static String discription;

    static CallService call = new TalkPackage();
    public static void Call(double dataa, Map<String, MobileCard> card, String number){
        type = "通话";
        data = dataa;
        discription = "和对象煲电话粥";
        ((TalkPackage)card.get(number).setPackage).talkTime -= dataa;
        System.out.println(discription);
    }
    static SendService sendText = new TalkPackage();
    public static void Send(double dataa, Map<String, MobileCard> card, String number){
        type = "发短信";
        data = dataa;
        discription = "和对象发了10条短信";
        ((TalkPackage)card.get(number).setPackage).smsCount -= dataa;
        System.out.println(discription);
    }
    static NetService watchMovie = new NetPackage();
    public static void Net(double dataa, Map<String, MobileCard> card, String number){
        type = "上网";
        data = dataa;
        discription = "看了一个最火的剧";
        ((SuperPackage)card.get(number).setPackage).flow -= dataa;
        System.out.println(discription);
    }
}
